﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="DocContractSrhForm.aspx.cs" ValidateRequest="false" Inherits="App_Master_DocContractSrhForm"
    Title="销售资料维护" %>

<%@ Register Assembly="ShpmCommon" Namespace="Shpm.System.Web.Control" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:Panel ID="PanelNavigate" runat="server" />
    <cc1:ComValidator ID="comValidatSrh" runat="server" CheckItems-Capacity="4"
        Font-Bold="True" ForeColor="White" Visible="False">
        <cc1:CheckMaxCharLenAttribute CharLen="4" Code="E0081" ControlToValidator="txtDocNo"
            ErrorMessage="">
            <cc1:ComAbsParamsAttribute Parameter="文件编号" />
            <cc1:ComAbsParamsAttribute Parameter="4" />
        </cc1:CheckMaxCharLenAttribute>
        <cc1:CheckLongAttribute Code="E0322" ControlToValidator="txtDocNo" ErrorMessage="">
            <cc1:ComAbsParamsAttribute Parameter="文件编号" />
        </cc1:CheckLongAttribute>
    </cc1:ComValidator>
    <table width="50%">
        <tr>
            <td>
                <table class="table_border_line">
                    <tr>
                        <td align="left" colspan="4" >
                        <script language="javascript">
                                        (new TitleBar('SearchBar', '检索条件')).showBar();
                            </script>
                        </td>
                    </tr>
                </table>
                <table class="table_border_line"  style="background:ffffff">
                    <tr>
                        <td style="width: 5%"></td>
                        <td align="left" style="width: 150px" class="list_data_bg_left" nowrap>资料类别</td>
                        <td align="left">
                            <asp:DropDownList ID="lstDocType" runat="server" Width="125px">
                            </asp:DropDownList></td>
                        <td align="right"></td>
                    </tr>
                    <tr>
                        <td style="width: 50px">&nbsp;</td>
                        <td style="width: 150px" class="list_data_bg_left" nowrap>文件编号</td>
                        <td align="left">
                            <asp:TextBox ID="txtDocNo" runat="server" Width="200px" MaxLength="4"></asp:TextBox></td>
                        <td align="right">&nbsp;</td>
                    </tr>
                    <tr>
                        <td style="width: 50px">&nbsp;</td>
                        <td style="width: 150px" class="list_data_bg_left" nowrap >标题</td>
                        <td align="left">
                            <asp:TextBox ID="txtDocTitle" runat="server" Width="200px" MaxLength="128"></asp:TextBox></td>
                        <td align="right">&nbsp;</td>
                    </tr>
                    <tr>
                        <td style="width: 50px"></td>
                        <td align="left" class="list_data_bg_left" nowrap style="width: 150px">关键字（文本内容）</td>
                        <td align="left">
                            <asp:TextBox ID="txtDocKeyword" runat="server" Width="200px" MaxLength="128"></asp:TextBox></td>
                        <td align="right"></td>
                    </tr>
                </table>
                <asp:HiddenField ID="hidDocId" runat="server" Visible="False" />
                <asp:HiddenField ID="hidDocTitle" runat="server" Visible="False" />
                <asp:HiddenField ID="hidDocContent" runat="server" Visible="False" />
                <asp:HiddenField ID="hidDocType" runat="server" Visible="False" />
            </td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td align="center">
                <asp:Button ID="btnNew" runat="server" Text="新 建" Width="68px"
                    OnClick="btnNew_Click" CssClass="button1" />&nbsp;
                <asp:Button ID="btnSearch" runat="server" Text="检 索" Width="68px"
                    OnClick="btnSearch_Click" CssClass="button1" /></td>
        </tr>
    </table>
    <br />
    <div id="tableResult">
        <table id="tblResult" width="80%" runat="server">
            <tr>
                <td align="left" class="list_title_blue_bg" >
                    <script language="javascript">
                                        (new TitleBar('SearchBar1', '检索结果')).showBar();
                            </script>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:GridView ID="viewSrhRst" runat="server" AllowPaging="True" DataSourceID="ObjectDataSource1"
                        EnableViewState="False" AutoGenerateColumns="False" CssClass="GridView_table"
                        DataKeyNames="DocId" OnRowCommand="viewSrhRst_RowCommand" OnPageIndexChanging="viewSrhRst_PageIndexChanging">
                        <Columns>
                            <asp:BoundField HeaderText="资料编号" DataField="DocId" Visible="False">
                                <HeaderStyle Width="0px" CssClass="GridView_head_grayblue" />
                                <ItemStyle CssClass="GridView_item_center" />
                            </asp:BoundField>
                            <asp:BoundField HeaderText="资料类别" DataField="TypeName">
                                <ItemStyle CssClass="GridView_item_center" />
                                <HeaderStyle Width="20%" CssClass="GridView_head_grayblue" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Title" HeaderText="标题">
                                <HeaderStyle Width="40%" CssClass="GridView_head_grayblue" />
                                <ItemStyle CssClass="GridView_item_left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="PubDate" HeaderText="发布日期" DataFormatString="{0:yyyy/MM/dd}"
                                HtmlEncode="False">
                                <ItemStyle CssClass="GridView_item_center" />
                                <HeaderStyle Width="30%" CssClass="GridView_head_grayblue" />
                            </asp:BoundField>
                            <asp:ButtonField ButtonType="Image" CommandName="details" HeaderText="详细" Text="详细"
                                ImageUrl="~/images/info.gif">
                                <ItemStyle CssClass="GridView_item_center" />
                                <HeaderStyle Width="10%" CssClass="GridView_head_grayblue" />
                            </asp:ButtonField>
                        </Columns>
                        <PagerSettings Mode="NumericFirstLast" />
                        <PagerStyle HorizontalAlign="Right" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<asp:ObjectDataSource
            ID="ObjectDataSource1" runat="server" TypeName="Shpm.App.Master.Dao.DocContractDao"
            ConvertNullToDBNull="True" EnableViewState="False" SelectMethod="ListDocContract"
            CacheExpirationPolicy="Sliding">
            <SelectParameters>
                <asp:ControlParameter ControlID="hidDocType" ConvertEmptyStringToNull="False" DefaultValue=""
                    Name="docType" PropertyName="Value" />
                <asp:ControlParameter ControlID="hidDocId" ConvertEmptyStringToNull="False" Name="docId"
                    PropertyName="Value" Type="String" DefaultValue="" />
                <asp:ControlParameter ControlID="hidDocTitle" ConvertEmptyStringToNull="False" Name="docTitle"
                    PropertyName="Value" Type="String" />
                <asp:ControlParameter ControlID="hidDocContent" ConvertEmptyStringToNull="False"
                    Name="docContent" PropertyName="Value" Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
</asp:Content>
